# 图表的基础使用
from pyecharts.charts import Line
from pyecharts.options import TitleOpts, ToolboxOpts, LegendOpts, TooltipOpts, VisualMapOpts

if __name__ == '__main__':
    line=Line()

    line.add_xaxis(["中国","美国","英国"])
    line.add_yaxis("GDP",[30,60,10])

    line.set_global_opts(
        title_opts=TitleOpts(title="GDP展示图",pos_left="center",pos_bottom="1%"),
        toolbox_opts=ToolboxOpts(is_show=True),
        legend_opts=LegendOpts(is_show=True),
        tooltip_opts=TooltipOpts(is_show=True),
        visualmap_opts=VisualMapOpts(is_show=True)
    )

    line.render("line.html")
